<template>
  <el-form label-width="6vw">
    <el-form-item label="标签类型">
      <el-select v-model="config.reelType" placeholder="标签类型">
        <el-option
          v-for="item of reelType"
          :key="item.value"
          :label="item.label + '标签'"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="辅助标签类型">
      <el-select v-model="config.proType" placeholder="辅助标签类型">
        <el-option label="湿度敏感标签" :value="1" />
        <el-option label="ROHS标签" :value="2" />
        <el-option label="ESD静电贴" :value="3" />
      </el-select>
    </el-form-item>
    <template v-if="config.proType == 1">
      <el-form-item
        label="粘贴湿敏标签"
        title="标签湿度敏感等级为MSL1时，是否粘贴湿敏标签"
      >
        <el-switch
          v-model="config.isNotNeedLabelForMSL1"
          active-text="是"
          inactive-text="否"
        ></el-switch>
      </el-form-item>
      <template v-if="config.isNotNeedLabelForMSL1">
        <el-form-item label="喷涂内容类型" title="湿敏标签喷涂内容类型">
          <el-select v-model="config.mslPrintMethod">
            <el-option label="不喷涂" :value="0"></el-option>
            <el-option label="日期" :value="1"></el-option>
            <el-option label="自定义内容" :value="2"></el-option>
          </el-select>
        </el-form-item>
        <template v-if="config.mslPrintMethod == 2">
          <el-form-item label="喷涂内容">
            <el-input v-model="config.mslCustomStr"></el-input>
          </el-form-item>
        </template>
      </template>
    </template>

    <el-form-item :label="$t('editFormula.needSeal')">
      <el-switch
        v-model="config.qaStamp"
        active-text="是"
        inactive-text="否"
      ></el-switch>
    </el-form-item>
    <template v-if="config.qaStamp">
      <el-form-item :label="$t('editFormula.sealNo')">
        <el-input v-model="config.qaStampCode"></el-input>
      </el-form-item>
      <!-- <el-form-item :label="$t('editFormula.sealDescribe')">
        <el-input v-model="config.qaStampDesc"></el-input>
      </el-form-item> -->
      <el-form-item :label="$t('editFormula.sealX')">
        <el-input-number v-model="config.qaStampX"></el-input-number>
      </el-form-item>
      <el-form-item :label="$t('editFormula.sealY')">
        <el-input-number v-model="config.qaStampY"></el-input-number>
      </el-form-item>
      <el-form-item :label="$t('editFormula.sealRotation')">
        <el-input-number v-model="config.qaStampAngle"></el-input-number>
      </el-form-item>
    </template>
  </el-form>
</template>
<script setup>
import { useI18n } from "vue-i18n";
import { reelType } from "@/store/editStore.js";

let props = defineProps({
  config: {
    type: Object,
    default: () => ({}),
  },
});

const { t: $t } = useI18n();
</script>
<style scoped lang="scss">
.el-form-item {
  margin-bottom: 10px;
}
.el-input-number {
  width: 100%;
}
</style>
